<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta name="applicable-device" content="pc" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta http-equiv="Cache-Control" content="no-transform" />
<title>登陆</title>
<link href="<%=path %>/css/bootstrap.min.css" rel="stylesheet">
<link href="<%=path %>/css/font-awesome.css" rel="stylesheet">

<link href="<%=path %>/css/animate.css" rel="stylesheet">
<link href="<%=path %>/css/style1.css?ver=1" rel="stylesheet">
<script type="text/javascript" src="<%=path %>/js/jquery-1.12.4.min.js"></script>
<script src="<%=path %>/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/jquery-form.js"></script>

<script type="text/javascript">

$(function(){
	$('#login_form').ajaxForm(function(data){
		if (data!=null&&data.loginResult!=null&&data.loginResult=="SUCCESS") {
			window.location.href="<%=path %>/foodIndex/index";
		} else {
			alert(data.errorMsg);
	   		return false;
		}
	});
});
</script>
</head>

<body class="gray-bg">

    <div class="middle-box text-center loginscreen animated fadeInDown">
        <div>
            <div>

                <h1 class="logo-name">在线美食网</h1>

            </div>
            <h3>欢迎登陆在线美食网</h3>
            <form class="m-t" id="login_form" role="form" action="<%=path %>/login/toLogin">
                <div class="form-group">
                    <input type="text" class="form-control" name ="userName" id="userName" placeholder="userName" required="">
                </div>
                <div class="form-group">
                    <input type="password" name="password" id="password" class="form-control" placeholder="password" required="">
                </div>
                <button type="submit" class="btn btn-primary block full-width m-b">登录</button>

                <!-- <a href="#"><small>Forgot password?</small></a> -->
                <p class="text-muted text-center"><small></small></p>
                <a class="btn btn-sm btn-white btn-block" href="<%=path %>/login/reregist">注册普通用户</a>
                <p class="text-muted text-center"><small></small></p>
                <a class="btn btn-sm btn-white btn-block" href="<%=path %>/login/reregistBusi">注册商户</a>
                
            </form>
            <!-- <p class="m-t"> <small>Inspinia we app framework base on Bootstrap 3 &copy; 2014</small> </p>
         -->
        </div>
    </div>

   
</body>

</html>
